//
//  CustomLayout.h
//  瀑布流练习2
//
//  Created by mini on 15/7/14.
//  Copyright (c) 2015年 mini. All rights reserved.
//

#import <UIKit/UIKit.h>
@class CustomLayout;
@protocol CustomLayoutDelegate <NSObject>
- (CGFloat)waterflowLayout:(CustomLayout *)waterflowLayout heightForWidth:(CGFloat)width atIndexPath:(NSIndexPath *)indexPath;
@end
@interface CustomLayout : UICollectionViewLayout
@property(nonatomic,assign)CGFloat columnMargin;//列间距
@property(nonatomic,assign)CGFloat rowMargin;//行间距
@property(nonatomic,assign)int count;//总列数
@property(nonatomic,assign)UIEdgeInsets sectionInset;//段间距
@property(nonatomic,strong)NSMutableDictionary *maxYDic;//记录最长的列值
@property(nonatomic,strong)NSMutableArray *array;//记录总数
@property(nonatomic,weak)id<CustomLayoutDelegate>delegate;
@end
